// 统计接口
import {request} from '../utils/request'

// 根据知识点id和考试id获取知识点平均分
export function getAverageByPoint (paperId) {
  return request({
    url: '/analysis/getAverageByPoint',
    method: 'get',
    params: {
      paperId: paperId
    }
  })
}

// 根据考试id获取学生分数人数分布
export function getNumByScore (examId) {
  return request({
    url: '/analysis/getNumByScore',
    method: 'get',
    params: {
      examId: examId
    }
  })
}

// 根据考试id获得学生的平均分
export function getExamAverage (examId) {
  return request({
    url: '/score/getExamAverage',
    method: 'get',
    params: {
      examId: examId
    }
  })
}

// 根据考试id获得学生分数的最分
export function getExamMax (examId) {
  return request({
    url: '/score/getExamMax',
    method: 'get',
    params: {
      examId: examId
    }
  })
}

// 根据考试id获得学生分数的中位数
export function getExamMedian (examId) {
  return request({
    url: '/score/getExamMedian',
    method: 'get',
    params: {
      examId: examId
    }
  })
}

// 根据考试id获得学生分数的最低分
export function getExamMin (examId) {
  return request({
    url: '/score/getExamMin',
    method: 'get',
    params: {
      examId: examId
    }
  })
}

// 根据考试id获得考试成绩的列表，教师端用
export function getExamHeadcountAndTime (paperId) {
  return request({
    url: '/analysis/getExamHeadcountAndTime',
    method: 'get',
    params: {
      paperId: paperId
    }
  })
}
